# Packages required for reproduction:

# if necessary install packages first
#install.packages(c("tidyverse", "stargazer", "MASS", "sandwich", "lmtest",
# "sjPlot", "dotwhisker", "broom", "did2s", "Hmisc", "ggrepel", "xtable", "pscl", "broom"))

library(tidyverse)
library(stargazer)
library(MASS)
library(sandwich)
library(lmtest)
library(sjPlot)
library(marginaleffects)
library(dotwhisker)
library(broom)
library(Hmisc)
library(ggrepel)
library(xtable)
library(pscl)
library(did2s)
library(sf)

# Theme for plots ---------------------------------------------------------

theme_lh <- theme_minimal() + theme(panel.border = element_rect("black", fill =NA,size = 0.5),
                                    text=element_text(size=16, colour = "black"),
                                    legend.position = "bottom")

col3 <- c("#003f5c", "#008472","#aab52d")

col_con <- c("#003f5c","#aab52d")


# sessionInfo output ------------------------------------------------------

# R version 4.1.0 (2021-05-18)
# Platform: x86_64-apple-darwin17.0 (64-bit)
# Running under: macOS 13.2.1
# 
# Matrix products: default
# LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
# 
# locale:
#   [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
# 
# attached base packages:
#   [1] stats     graphics  grDevices utils     datasets  methods   base     
# 
# other attached packages:
#   [1] sf_1.0-7              did2s_0.7.0           fixest_0.10.4         pscl_1.5.5            xtable_1.8-4          ggrepel_0.9.1        
# [7] Hmisc_4.6-0           Formula_1.2-4         survival_3.3-1        lattice_0.20-45       broom_0.7.12          dotwhisker_0.7.4     
# [13] marginaleffects_0.4.0 lmtest_0.9-39         zoo_1.8-9             sandwich_3.0-1        MASS_7.3-55           stargazer_5.2.3      
# [19] forcats_0.5.1         stringr_1.4.0         dplyr_1.0.8           purrr_0.3.4           readr_2.1.3           tidyr_1.2.0          
# [25] tibble_3.1.8          ggplot2_3.3.5         tidyverse_1.3.2      
# 
# loaded via a namespace (and not attached):
#   [1] nlme_3.1-155        fs_1.5.2            lubridate_1.8.0     insight_0.16.0      RColorBrewer_1.1-2  httr_1.4.2          dreamerr_1.2.3     
# [8] numDeriv_2016.8-1.1 tools_4.1.0         backports_1.4.1     utf8_1.2.2          R6_2.5.1            KernSmooth_2.23-20  rpart_4.1.16       
# [15] DBI_1.1.3           colorspace_2.0-3    nnet_7.3-17         withr_2.5.0         tidyselect_1.2.0    gridExtra_2.3       emmeans_1.7.2      
# [22] compiler_4.1.0      cli_3.4.1           rvest_1.0.2         htmlTable_2.4.0     xml2_1.3.3          bayestestR_0.11.5   scales_1.1.1       
# [29] checkmate_2.0.0     classInt_0.4-3      mvtnorm_1.1-3       proxy_0.4-26        digest_0.6.29       foreign_0.8-82      base64enc_0.1-3    
# [36] jpeg_0.1-9          pkgconfig_2.0.3     htmltools_0.5.2     dbplyr_2.1.1        fastmap_1.1.0       htmlwidgets_1.5.4   rlang_1.0.6        
# [43] readxl_1.4.1        rstudioapi_0.13     generics_0.1.2      jsonlite_1.8.0      googlesheets4_1.0.0 magrittr_2.0.2      parameters_0.17.0  
# [50] Matrix_1.4-0        Rcpp_1.0.8.3        munsell_0.5.0       fansi_1.0.2         lifecycle_1.0.3     stringi_1.7.6       multcomp_1.4-18    
# [57] ggstance_0.3.5      grid_4.1.0          crayon_1.5.0        haven_2.4.3         splines_4.1.0       hms_1.1.1           knitr_1.37         
# [64] pillar_1.7.0        estimability_1.3    codetools_0.2-18    reprex_2.0.1        glue_1.6.2          latticeExtra_0.6-29 data.table_1.14.2  
# [71] modelr_0.1.8        png_0.1-7           vctrs_0.5.1         tzdb_0.3.0          cellranger_1.1.0    gtable_0.3.0        assertthat_0.2.1   
# [78] datawizard_0.3.0    xfun_0.30           e1071_1.7-9         coda_0.19-4         class_7.3-20        googledrive_2.0.0   gargle_1.2.0       
# [85] units_0.8-0         cluster_2.1.2       TH.data_1.1-0       ellipsis_0.3.2     